<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="parent">
    <div class="child" style="height:200px;">
    </div>
    <div class="child" style="height:200px;">
    </div>
</div>
<br/>
<div class="parent">
    <div class="child" style="height:300px;">

    </div>
    <div class="child" style="height:300px;">
    </div>
</div>
</body>
<style>

    .parent {
        display:flex;
        width:400px;
        justify-content:center;
        align-content:center;
        align-items:stretch;
    }
    .child {
        width:50px;
        outline:solid 1px;
    }

</style>
</html>